Skip to content

Purge more quadratic-time regexes #581

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 17, 2025

Conversation

ExplodingCabbage
Copy link
Collaborator

@ExplodingCabbage ExplodingCabbage commented Feb 14, 2025

Like #580.

To demonstrate the performance issue, run the following code either before or after applying this change (remember to build):

console.time(); diff.diffWords('a' + ' '.repeat(100000) + 'b', 'a' + ' '.repeat(100000) + 'c'); console.timeEnd()

On master (before merging this), this takes 17 seconds on my machine; on this branch, it takes a couple of milliseconds.

@ExplodingCabbage ExplodingCabbage self-assigned this Feb 14, 2025
@ExplodingCabbage ExplodingCabbage marked this pull request as ready for review February 17, 2025 12:10
@ExplodingCabbage ExplodingCabbage merged commit 81426fc into master Feb 17, 2025
@ExplodingCabbage ExplodingCabbage deleted the fix-more-quadratic-regexes branch February 17, 2025 12:12
ExplodingCabbage added a commit that referenced this pull request Feb 25, 2025
ExplodingCabbage added a commit that referenced this pull request Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant